package com.zelix;

import java.util.HashMap;
import java.util.Hashtable;

class dh extends ch {

    boolean n;
    Hashtable o;
    private static String z[];

    dh(ih ih, boolean flag, int i, int j, Hashtable hashtable, qy qy, Hashtable hashtable1) {
        super(ih, hashtable, qy, hashtable1, i, j);
        o = new Hashtable();
        n = flag;
    }

    private String a(String s, fh fh1, String s1, String s2, String s3) {
        String s4;
        String s5;
        String s6;
        sx sx1;
        s5 = "";
        if (s.equals(""))
            s5 = b(s1);
        if (fh1.c().E()) {
            s6 = z[3];
        } else {
            s6 = z[2];
        }
        int i;
        sx1 = (sx) o.get(s6);
        if (sx1 == null) {
            i = 1;
            sx1 = new sx(i);
            o.put(s6, sx1);
        } else {
            i = sx1.c();
        }
        s4 = s + s5 + s2 + s6 + i + s3;
        while (a(s1, s4)) {
            s4 = s + s5 + s2 + s6 + sx1.c() + s3;
        }
        return s4;
    }

    String a(fh fh1) {
        String s;
        String s1;
        py py1 = super.l.b(fh1.c());
        if (py1 != null) {
            s = (String) py1.b();
            s1 = (String) py1.c();
        } else {
            s = "";
            s1 = "";
        }
        return a("", fh1, z[0], fh1.d(), s, s1);
    }

    String a(String s, fh fh1, String s1, String s2, String s3, String s4) {
        String s6;
        sx sx1;
        String s7;
        boolean flag;
        String s5;
        s5 = "";
        if (s1.equals(z[0])) {
            flag = true;
            if (fh1.c().E()) {
                s1 = z[3];
            } else {
                s1 = z[2];
            }
        }
        flag = false;
        int j = s1.lastIndexOf('/');
        if (j != -1)
            s1 = s1.substring(j + 1, s1.length());
        if (s.equals(""))
            s5 = b(s2);
        if (flag) {
            s6 = s1;
        } else if (fh1.c().E()) {
            s6 = s1 + z[5];
        } else
            s6 = s1 + z[4];
        int i;
        sx1 = (sx) o.get(s1);
        if (sx1 == null) {
            i = 1;
            sx1 = new sx(i);
            o.put(s1, sx1);
        } else
            i = sx1.c();
        s6 = s + s5 + s3 + s6;
        s7 = s6 + i + s4;
        while (a(s2, s7)) {
            s7 = s6 + sx1.c() + s4;
        }
        return s7;
    }

    String a(fh fh1, String s, HashMap hashmap, String s1, py py1) {
        String s2;
        String s3;
        if (py1 != null) {
            s2 = (String) py1.b();
            s3 = (String) py1.c();
            if (py1.a() == null) {
                s2 = s2 + z[1];
            }
        } else {
            s2 = "";
            s3 = "";
        }
        String s4;
        String s5 = fh1.o();
        mt mt = fh1.n();
        if (n && (mt == null || super.c.get(mt) == null) && super.g.get(s5) != null) {
            Object obj;
            if ((obj = super.f.get(s5)) == null)
                return null;
            s5 = (String) obj;
        }
        if (n) {
            s4 = a(s, fh1, s5, s1, s2, s3);
        } else {
            s4 = a(s, fh1, s1, s2, s3);
        }
        super.e.put(s4, s4);
        return s4;
    }

    private static String z(char[] chs) {
        byte key = 0;
        for (int i = 0; i < chs.length; i++) {
            switch (i % 5) {
                case 0:
                    key = 0x44;
                    break;
                case 1:
                    key = 95;
                    break;
                case 2:
                    key = 115;
                    break;
                case 3:
                    key = 32;
                    break;
                case 4:
                    key = 28;
                    break;
            }
            chs[i] ^= key;
        }
        return new String(chs).intern();
    }

    static {
        String as[];
        as = new String[6];
        as[0] = z(".>\005A3(>\035G3\013=\031E\1770".toCharArray());
        as[1] = z(">%\tZ".toCharArray());
        as[2] = z("\0073\022So".toCharArray());
        as[3] = z("\r1\007En\">\020E".toCharArray());
        as[4] = z("\033\f\006B".toCharArray());
        as[5] = z("\033\026\036Pp".toCharArray());
        z = as;
    }
}